﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GrouponDesktop
{
    public partial class RegistrarSeleccionarTipo : Form
    {
        public RegistrarSeleccionarTipo()
        {
            InitializeComponent();
        }

        private void btnNext_Click(object sender, EventArgs e)
        {
            if (cboTipo.SelectedIndex != -1)
            {
                //Si es proveedor
                if(cboTipo.SelectedIndex == 0){
                    AbmProveedor.AgregarProveedor form = new GrouponDesktop.AbmProveedor.AgregarProveedor();
                    form.FormClosed += new FormClosedEventHandler(btnCancelar_Click); 
                    form.ShowDialog();
                }else{
                    RegistrarCliente form = new GrouponDesktop.RegistrarCliente();
                    form.FormClosed += new FormClosedEventHandler(btnCancelar_Click); 
                    form.ShowDialog();
                }
            }
        }

        private void btnCancelar_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
